← Back
Editing: index-legacy197.js
!function(){function e(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,n,a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",o=a.toStringTag||"@@toStringTag";function i(t,a,u,o){var i=a&&a.prototype instanceof c?a:c,f=Object.create(i.prototype);return r(f,"_invoke",function(t,r,a){var u,o,i,c=0,f=a||[],s=!1,p={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(n,t){return u=n,o=0,i=e,p.n=t,l}};function v(t,r){for(o=t,i=r,n=0;!s&&c&&!a&&n<f.length;n++){var a,u=f[n],v=p.p,d=u[2];t>3?(a=d===r)&&(i=u[(o=u[4])?5:(o=3,3)],u[4]=u[5]=e):u[0]<=v&&((a=t<2&&v<u[1])?(o=0,p.v=r,p.n=u[1]):v<d&&(a=t<3||u[0]>r||r>d)&&(u[4]=t,u[5]=r,p.n=d,o=0))}if(a||t>1)return l;throw s=!0,r}return function(a,f,d){if(c>1)throw TypeError("Generator is already running");for(s&&1===f&&v(f,d),o=f,i=d;(n=o<2?e:i)||!s;){u||(o?o<3?(o>1&&(p.n=-1),v(o,i)):p.n=i:p.v=i);try{if(c=2,u){if(o||(a="next"),n=u[a]){if(!(n=n.call(u,i)))throw TypeError("iterator result is not an object");if(!n.done)return n;i=n.value,o<2&&(o=0)}else 1===o&&(n=u.return)&&n.call(u),o<2&&(i=TypeError("The iterator does not provide a '"+a+"' method"),o=1);u=e}else if((n=(s=p.n<0)?i:t.call(r,p))!==l)break}catch(n){u=e,o=1,i=n}finally{c=1}}return{value:n,done:s}}}(t,u,o),!0),f}var l={};function c(){}function f(){}function s(){}n=Object.getPrototypeOf;var p=[][u]?n(n([][u]())):(r(n={},u,function(){return this}),n),v=s.prototype=c.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,r(e,o,"GeneratorFunction")),e.prototype=Object.create(v),e}return f.prototype=s,r(v,"constructor",s),r(s,"constructor",f),f.displayName="GeneratorFunction",r(s,o,"GeneratorFunction"),r(v),r(v,o,"Generator"),r(v,u,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(t=function(){return{w:i,m:d}})()}function r(e,n,t,a){var u=Object.defineProperty;try{u({},"",{})}catch(e){u=0}r=function(e,n,t,a){function o(n,t){r(e,n,function(e){return this._invoke(n,t,e)})}n?u?u(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(o("next",0),o("throw",1),o("return",2))},r(e,n,t,a)}function a(e,n,t,r,a,u,o){try{var i=e[u](o),l=i.value}catch(e){return void t(e)}i.done?n(l):Promise.resolve(l).then(r,a)}function u(e){return function(){var n=this,t=arguments;return new Promise(function(r,u){var o=e.apply(n,t);function i(e){a(o,r,u,i,l,"next",e)}function l(e){a(o,r,u,i,l,"throw",e)}i(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./index-legacy130.js?v=1765440387","./validator-legacy.js?v=1765440387","./useStore-legacy3.js?v=1765440387","./site-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./ace-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./column-legacy.js?v=1765440387"],function(n,r){"use strict";var a,o,i,l,c,f,s,p,v,d,m,y,b,h,g,w,j,_,x,S,O,k,V,P,A,C,T,D,G,E;return{setters:[function(e){a=e.K,o=e.h,i=e.b},function(e){l=e.c,c=e.s,f=e.r,s=e.p,p=e.q,v=e.v,d=e.y,m=e.B,y=e.e,b=e.A,h=e.F,g=e.a$,w=e.x,j=e.M,_=e.P,x=e.z,S=e.aj,O=e.ak,k=e.b0,V=e.D},function(e){P=e._},function(e){A=e.h,C=e.i,T=e.o},function(e){D=e.S},function(e){G=e.bb,E=e.bc},null,null,null,null],execute:function(){var r={class:"p-2rem"},F={class:"flex items-center"},U={class:"relative h-full"},H={class:"p-20px"},I={class:"overflow-auto h-[12rem] border border-[#efefef] p-12px"},N={class:"absolute bottom-0 w-full bg-[#f6f8f8] flex items-center justify-end p-12px"};n("default",l({__name:"index",props:{compData:{default:function(){}}},emits:["close"],setup:function(n,l){var q=l.expose,J=l.emit,M=c(D()).batchConfig,$=D().getFileEvent,z=i(),B=n,K=J,L=f(""),Q=f(!1),R=f([]),W=f([]),X=f(),Y=f(),Z=function(){var e=u(t().m(function e(){var n;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,G({site_ids:JSON.stringify(B.compData.map(function(e){return e.id})),site_type:"PHP"});case 1:n=e.v,R.value=n.data.site_rewrites,W.value=n.data.template_rewrites,e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=u(t().m(function e(n){return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,te(n);case 1:Y.value="";case 2:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),ne=function(){var e=u(t().m(function e(n){return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,te(n);case 1:X.value="";case 2:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),te=function(){var e=u(t().m(function e(n){var r,a;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,$({path:n});case 1:r=e.v,a=r.data,L.value=a.data,e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}));return function(n){return e.apply(this,arguments)}}(),re=function(){var e=u(t().m(function e(){var n,r,u,o,i;return t().w(function(e){for(;;)switch(e.n){case 0:n=JSON.stringify(B.compData.map(function(e){var n=R.value.find(function(n){return n.id===e.id});return{id:e.id,name:e.name,file:n.file}})),r=M.value,u=r.exclude,o=r.enable,i=A(!1,u,o,{params:{site_list:n,project_type:"PHP",rewrite_data:L.value}}),a({loading:"正在部署,请稍后...",request:E(i),success:function(e){var n=C(e.data).data;T(n,{title:"部署伪静态"}),Q.value=!1,K("close")}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return q({onConfirm:function(){X.value||Y.value?Q.value=!0:z.error("请选择一种伪静态规则")}}),s(u(t().m(function e(){return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Z();case 1:return e.a(2)}},e)}))),function(t,a){var u=S,i=O,l=k,c=P,f=V,s=o;return p(),v("div",r,[d("div",F,[a[5]||(a[5]=m(" 站点已有伪静态规则: ",-1)),y(i,{class:"mx-12px !w-16rem",modelValue:w(X),"onUpdate:modelValue":a[0]||(a[0]=function(e){return _(X)?X.value=e:null}),onChange:ee},{default:b(function(){return[(p(!0),v(h,null,g(w(R),function(e){return p(),j(u,{key:e.id,label:e.name+"站点的伪静态配置",value:e.file},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"]),a[6]||(a[6]=m(" 模板伪静态规则: ",-1)),y(i,{class:"mx-12px !w-16rem",modelValue:w(Y),"onUpdate:modelValue":a[1]||(a[1]=function(e){return _(Y)?Y.value=e:null}),onChange:ne},{default:b(function(){return[(p(!0),v(h,null,g(w(W),function(e){return p(),j(u,{key:e.id,label:e.name+"模板的伪静态配置",value:e.file},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])]),y(l),y(c,{modelValue:w(L),"onUpdate:modelValue":a[2]||(a[2]=function(e){return _(L)?L.value=e:null}),class:"!h-[42rem]"},null,8,["modelValue"]),y(s,{title:"部署当前伪静态",modelValue:w(Q),"onUpdate:modelValue":a[4]||(a[4]=function(e){return _(Q)?Q.value=e:null}),area:[52,28]},{default:b(function(){return[d("div",U,[d("div",H,[a[7]||(a[7]=d("span",{class:"!mb-4px inline-block"},"如下是需要批量部署伪静态的站点:",-1)),d("div",I,[(p(!0),v(h,null,g(n.compData,function(e,n){return p(),v("div",{key:n,class:"p-4px w-full"},x(e.name),1)}),128))]),a[8]||(a[8]=d("div",{class:"text-danger mt-4px"},"注意:批量设置站点伪静态后,原有站点伪静态配置将被覆盖。",-1))]),d("div",N,[y(f,{type:"warning",onClick:a[3]||(a[3]=function(e){return Q.value=!1})},{default:b(function(){return e(a[9]||(a[9]=[m("取消",-1)]))}),_:1}),y(f,{type:"primary",onClick:re},{default:b(function(){return[m("部署("+x(n.compData.length)+"项)",1)]}),_:1})])])]}),_:1},8,["modelValue"])])}}}))}}})}();
Save File
Cancel